<template>
  <view style="max-height:30vh;overflow:scroll;" class="w-160rpx mt-20rpx flex-col items-center justify-center text-center">
    <view class="flex justify-between py-2rpx">
      <text class="text-gray-400">会员：</text> <text>{{ merberInfo.name }}</text>
    </view>
    <view class="flex justify-between py-2rpx">
      <text class="text-gray-400">会员等级：</text> <text>{{ merberInfo.level }}</text>
    </view>
    <view class="flex justify-between py-2rpx">
      <text class="text-gray-400">商户账户余额</text> <text>￥{{ merberInfo.businessMoney || 0 }}</text>
    </view>
    <view  class="flex justify-between py-2rpx">
      <text class="text-gray-400">平台账户余额</text> <text>￥{{ merberInfo.vaMoney || 0 }}</text>
    </view>
    <view class="flex justify-between py-2rpx">
      <text class="text-gray-400">赠送账户余额</text> <text>￥{{ merberInfo.giveMoney || 0 }}</text>
    </view>

    <u-gap height="10rpx" bg-color="transparent"></u-gap>

    <view class="flex justify-between py-2rpx">
      <text class="text-gray-400">订单金额</text> <text>￥{{ formatMoney(merberInfo.orderMoney) }}</text>
    </view>
    <view class="flex justify-between py-2rpx">
      <text class="text-gray-400">会员折扣</text> <text>- ￥{{ formatMoney(merberInfo.discount) || "0.00" }}</text>
    </view>
    <view class="flex justify-between py-2rpx">
      <text class="text-gray-400">助餐补贴</text> <text>- ￥{{ formatMoney(merberInfo.helpMoney )|| "0.00" }}</text>
    </view>
    <view class="flex justify-between py-2rpx">
      <text class="text-gray-400">实付金额</text> <text> ￥{{ formatMoney(merberInfo.payMoney) }}</text>
    </view>
  </view>
</template>
<script setup>
import { formatMoney } from '@/utils/util';
import { computed } from 'vue';

const props = defineProps({
  info: {
    type: Object,
    default: () => ({}),
    required: true,
  },
});

const merberInfo = computed(() => props.info);

</script>
